﻿<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:CustCmd="clr-namespace:SSG.View" xmlns:Syncfusion="http://schemas.syncfusion.com/wpf" x:Name="_wiMainWindow" x:Class="SSG.MainWindow"
        Title="Generating SIDs and STARs" Width="500" Height="400" MinHeight="400" MinWidth="500" MaxHeight="400" MaxWidth="600" Closing="WindowClosing" Icon="Resources/TACAN20.png">
    <Window.CommandBindings>
        <CommandBinding Command="{x:Static CustCmd:Commands.SettingsDir}" CanExecute="CmdSettingsDirCanExecute" Executed="CmdSettingsDir" />
        <CommandBinding Command="{x:Static CustCmd:Commands.SettingsReset}" CanExecute="CmdSettingsResetCanExecute" Executed="CmdSettingsReset" />
        <CommandBinding Command="{x:Static CustCmd:Commands.About}" CanExecute="CmdAboutCanExecute" Executed="CmdAbout" />
        <CommandBinding Command="{x:Static CustCmd:Commands.Website}" CanExecute="CmdWebsiteCanExecute" Executed="CmdWebsite" />
    </Window.CommandBindings>
    <Grid x:Name="_grMainWindow" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Menu x:Name="_mnHeaderMenu" HorizontalAlignment="Stretch" Height="Auto" Grid.Row ="0" VerticalAlignment="Top" Width="Auto">
            <MenuItem Header="_File">
                <MenuItem Header="Open settings directory" Command="{x:Static CustCmd:Commands.SettingsDir}"/>
                <MenuItem x:Name="_miFileDeleteAllSettings" Header="Delete all settings" Command="{x:Static CustCmd:Commands.SettingsReset}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}"/>
                <MenuItem x:Name="_miFileResetGeneratingSettings" Header="Reset generating settings" Command="{x:Static CustCmd:Commands.SettingsReset}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}"/>
                <Separator/>
                <MenuItem Header="Clear console" Click="ClearConsole"/>
                <Separator/>
                <MenuItem Header="Close" Command="ApplicationCommands.Close"/>
            </MenuItem>
            <MenuItem Header="_Help">
                <MenuItem x:Name="_miHelpAbout" Header="About" Command="{x:Static CustCmd:Commands.About}" />
                <MenuItem x:Name="_miHelpWebsite" Header="Web site" Command="{x:Static CustCmd:Commands.Website}"/>
                <MenuItem x:Name="_miHelpLicense" Header="License" Command="{x:Static CustCmd:Commands.Website}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}"/>
                <MenuItem x:Name="_miHelpLegal" Header="Legal information" Command="{x:Static CustCmd:Commands.Website}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}"/>
            </MenuItem>
        </Menu>
        <TabControl x:Name="_tcMainWindow" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row ="1">
            <TabItem x:Name="_taiMain" Header="Main">
                <Grid x:Name="_grTabMain" Background="#FFE5E5E5">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="130"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Label x:Name="_lblSourceDirectory" Grid.Row="0" Grid.Column="0" Content="Source directory:" HorizontalAlignment="Left" ToolTip="Use PMDG format, double click opens directory" MouseDoubleClick="ExplorerOpenDirectory"/>
                    <TextBox x:Name="_tbSourceDirectory" Grid.Row="0" Grid.Column="1" TextWrapping="NoWrap" Text="{Binding Settings.SourceDirectory, UpdateSourceTrigger=PropertyChanged}" Margin="0,4,0,0" />
                    <Button x:Name="_btnSelectSourceDirectory" Grid.Row="0" Grid.Column="2" Content="Select" Width="75" Height="23" Click="SelectDirectory" Margin="3,4,0,0"/>
                    <Label x:Name="_lblDestinationDirectory" Grid.Row="1" Grid.Column="0" Content="Destination directory:" ToolTip="Double click opens directory" MouseDoubleClick="ExplorerOpenDirectory" Margin="0,0,4,0"/>
                    <TextBox x:Name="_tbDestinationDirectory" Grid.Row="1" Grid.Column="1" TextWrapping="NoWrap" Text="{Binding Settings.DestinationDirectory, UpdateSourceTrigger=PropertyChanged}" Margin="0,4,0,0" />
                    <Button x:Name="_btnSelectDestinationDirectory" Grid.Row="1" Grid.Column="2" Content="Select" Width="75" Height="23" Click="SelectDirectory" Margin="3,4,0,0"/>
                    <Label x:Name="_lblFilenamePattern" Content="Filename pattern:" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Left"/>
                    <TextBox x:Name="_tbFilenamePattern" Grid.Row="2" Grid.Column="1" TextWrapping="NoWrap" Text="{Binding Settings.FilenamePattern, UpdateSourceTrigger=PropertyChanged}" Margin="0,4,0,0"/>
                    <Button x:Name="_btnResetFilePattern" Grid.Row="2" Grid.Column="2" Content="Reset" Width="75" Height="23" Click="ResetFilePattern" Margin="3,4,0,0"/>
                    <Label x:Name="_lblAirports" Content="Airports:" Grid.Row="3" Grid.Column="0" ToolTip="Type name in combobox to navigate" Margin="0,4,0,6"/>
                    <ListBox x:Name="_lbSidStarAirports" Grid.Row="3" Grid.Column="1" ItemsSource="{Binding SidStarAirports, UpdateSourceTrigger=PropertyChanged}" ToolTip="Type name to navigate" SelectionMode="Extended" HorizontalAlignment="Left" Height="165" Width="125" Margin="0,4,0,0">
                        <ListBox.ContextMenu>
                            <ContextMenu>
                                <MenuItem x:Name="_miAirportsAddSelectedGroup" Header="Add to selected group" Click="AirportsContextMenuClick"/>
                                <MenuItem x:Name="_miAirportsAddGroup" Header="Add to group" Click="AirportsContextMenuClick"/>
                                <MenuItem x:Name="_miAirportsUnselectAll" Header="Unselect all" Click="AirportsContextMenuClick"/>
                                <Separator x:Name="_miAirportsSeperator"/>
                                <MenuItem x:Name="_miAirportsOpenInEditor" Header="Open in editor" Click="AirportsContextMenuClick"/>
                            </ContextMenu>
                        </ListBox.ContextMenu>
                    </ListBox>
                    <TreeView x:Name="_tvGroupingAirports" HorizontalAlignment="Stretch" Height="165" Grid.Row="3" Grid.Column="1" SelectedItemChanged="GroupsContextmenuItemChanged" Margin="135,4,2,0">
                        <TreeView.ContextMenu>
                            <ContextMenu StaysOpen="true">
                                <MenuItem x:Name="_miGroupsRename" Header="Rename" Click="GroupsContextMenuClick"/>
                                <MenuItem x:Name="_miGroupsRemove" Header="Remove" Click="GroupsContextMenuClick"/>
                                <MenuItem x:Name="_miGroupsSelect" Header="Select" Click="GroupsContextMenuClick"/>
                            </ContextMenu>
                        </TreeView.ContextMenu>
                    </TreeView>
                    <Button x:Name="_btnRefreshSidStarAirports" Grid.Row="3" Grid.Column="2" Content="Refresh" Width="75" Height="23" Click="RefreshAirportsNavaidsAndRunways" VerticalAlignment="Top" Margin="4,4,0,0"/>
                    <Canvas Height="Auto" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="2" VerticalAlignment="Top" Width="Auto">
                        <Button x:Name="_btnGenerateFiles" Content="Generate" Width="75" Click="GenerateFiles" Margin="0,4,0,0"/>
                        <Button x:Name="_btnShowDestinationDirectory" Content="Destination directory" ToolTip="Show destination directory in Explorer" Width="130" Canvas.Left="80" Canvas.Top="4" Click="ExplorerOpenDirectoryRoutedEvent"/>
                    </Canvas>
                </Grid>
            </TabItem>
            <TabItem x:Name="_taiConsole" Header="Console">
                <Grid Background="#FFE5E5E5">
                    <TextBox x:Name="_tbConsole" IsReadOnly="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" FontSize="11" FontFamily="Courier New"/>
                </Grid>
            </TabItem>
            <TabItem x:Name="_taiContentSettings" Header="Content settings">
                <Grid x:Name="_grTabContentSettings" Background="#FFE5E5E5">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Label x:Name="_lblSettingsSids" Grid.Row="0" Grid.Column="0" Content="SIDs:" HorizontalAlignment="Left"/>
                    <ComboBox x:Name="_cbSettingsSidOrder" Grid.Row="0" Grid.Column="1" ItemsSource="{Binding OrderOptions, Mode=OneWay}" DisplayMemberPath="Text" SelectedItem="{Binding SidOrder, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,4,15,0"/>
                    <CheckBox Grid.Row="0" Grid.Column="2" x:Name="_cbSettingsRunwayTracksSids" Content="runway tracks" Margin="0,8,10,0" IsChecked="{Binding Settings.UseRunwayTracksSids, UpdateSourceTrigger=PropertyChanged}" ToolTip="Fixes of runway headings will be included"/>
                    <Label x:Name="_lblSettingsStars" Grid.Row="1" Grid.Column="0" Content="STARs:" Margin="0,0,4,0"/>
                    <ComboBox x:Name="_cbSettingsStarOrder" Grid.Row="1" Grid.Column="1" ItemsSource="{Binding OrderOptions, Mode=OneWay}" DisplayMemberPath="Text" SelectedItem="{Binding StarOrder, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,4,15,0"/>
                    <CheckBox Grid.Row="1" Grid.Column="2" x:Name="_cbSettingsRunwayTracksStars" Content="runway tracks" Margin="0,8,10,0" IsChecked="{Binding Settings.UseRunwayTracksStars, UpdateSourceTrigger=PropertyChanged}" ToolTip="Fixes of runway headings will be included"/>
                    <Label x:Name="_lblSettingsTransitions" Content="Transitions:" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Left"/>
                    <ComboBox x:Name="_cbSettingsTransitionOrder" Grid.Row="2" Grid.Column="1" ItemsSource="{Binding OrderOptions, Mode=OneWay}" DisplayMemberPath="Text" SelectedItem="{Binding TransitionOrder, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,4,15,0"/>
                    <Menu x:Name="_mnNameFilterTransitions" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="2" VerticalAlignment="Top" BorderBrush="Black" BorderThickness="1" Margin="0,4,0,0">
                        <MenuItem x:Name="_miNameFilterTransitions"  Header="Name filter₁₂" StaysOpenOnClick="true" Background="Transparent">
                            <MenuItem Header="Names with runway" StaysOpenOnClick="true" IsCheckable="True" IsChecked="{Binding Settings.NameFilterTransitions.NamesWithRunway, UpdateSourceTrigger=PropertyChanged}"/>
                            <MenuItem Header="Names with number" StaysOpenOnClick="true" IsCheckable="True" IsChecked="{Binding Settings.NameFilterTransitions.NamesWithNumber, UpdateSourceTrigger=PropertyChanged}"/>
                            <MenuItem Header="Filtered elements as comments" StaysOpenOnClick="true" IsCheckable="True" IsChecked="{Binding Settings.NameFilterTransitions.FilteredAsComments, UpdateSourceTrigger=PropertyChanged}"/>
                            <RadioButton GroupName="FilterExcludeOrInclude" Content=" Exclude" IsChecked="{Binding Settings.NameFilterTransitions.ModeExclude, UpdateSourceTrigger=PropertyChanged}" Margin="-20,2,0,3"/>
                            <RadioButton GroupName="FilterExcludeOrInclude" Content=" Include" IsChecked="{Binding Settings.NameFilterTransitions.ModeInclude, UpdateSourceTrigger=PropertyChanged}" Margin="-20,2,0,3"/>
                            <RadioButton GroupName="FilterExcludeOrInclude" Content=" Ignore"  IsChecked="{Binding Settings.NameFilterTransitions.ModeIgnore, UpdateSourceTrigger=PropertyChanged}"  Margin="-20,2,0,3"/>
                        </MenuItem>
                    </Menu>
                    <Label x:Name="_lblTransitionsBasedOn" Grid.Row="3" Grid.Column="0" Content=" ... based on"/>
                    <CheckBox x:Name="_cbTransitionByApproaches" Content="Approaches" IsChecked="{Binding Settings.TransitionsIncludeApproaches, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="0,0,0,0" Grid.Row="3" VerticalAlignment="Center" ToolTip="Transitions based on approaches"/>
                    <CheckBox x:Name="_cbTransitionBySids" Content="SIDs" IsChecked="{Binding Settings.TransitionsIncludeSids, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="90,0,0,0" Grid.Row="3" VerticalAlignment="Center" ToolTip="Transitions based on SIDs"/>
                    <CheckBox x:Name="_cbTransitionByStars" Content="STARs" IsChecked="{Binding Settings.TransitionsIncludeStars, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="165,0,0,0" Grid.Row="3" VerticalAlignment="Center" ToolTip="Transitions based on STARs"/>
                    <Label x:Name="_lblSctHeaderPattern" Grid.Row="4" Grid.Column="0" Margin="0,0,4,0" Content="SCT header pattern:"/>
                    <TextBox x:Name="_tbSctHeaderPattern" TextWrapping="NoWrap"  Margin="0,4,15,0" Grid.Row="4" Grid.Column="1" Text="{Binding Settings.SctHeaderlineDesignatorPattern, UpdateSourceTrigger=PropertyChanged}"/>
                    <Button x:Name="_btnResetSctHeaderlinePattern" Grid.Row="4" Grid.Column="2" Content="Reset" HorizontalAlignment="Left" Margin="0,3,0,0" Width="75" Height="23" Click="ResetSctHeaderlinePattern"/>
                    <Label x:Name="_lblWrittenFiles" Grid.Row="5" Grid.Column="0" Content="Written files:"/>
                    <CheckBox x:Name="_cbWriteEseFile" IsChecked="{Binding Settings.GenerateEse, UpdateSourceTrigger=PropertyChanged}" Content="ESE file" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,0,0,0"/>
                    <CheckBox x:Name="_cbWriteSctFile" IsChecked="{Binding Settings.GenerateSct, UpdateSourceTrigger=PropertyChanged}" Content="SCT file" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="90,0,0,0"/>
                    <CheckBox x:Name="_cbWriteKmlFile" IsChecked="{Binding Settings.GenerateKml, UpdateSourceTrigger=PropertyChanged}" Content="KML file" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="170,0,0,0"/>
                    <Label x:Name="_lblSettingsMisc" Grid.Row="6" Grid.Column="0" Content="Miscellaneous:" HorizontalAlignment="Left" Margin="0,0,5,0"/>
                    <CheckBox x:Name="_cbNdbNameSubstitution" IsChecked="{Binding Settings.NdbNameCorrection, UpdateSourceTrigger=PropertyChanged}" Content="NDB NB string removal₂" ToolTip="e.g. RTBNB-&gt;RTB" Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,6,0,0"/>
                    <CheckBox x:Name="_cbTrackWithoutSpace" IsChecked="{Binding Settings.TrackNameWithoutSpaces, UpdateSourceTrigger=PropertyChanged}" Content="No spaces in track name₁₂" ToolTip="Remove space in track names" Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="170,6,0,0" />
                    <Label x:Name="_lbSctHeaderPattern" Content="Blacklist" Grid.Row="7" Grid.Column="0"/>
                    <StackPanel x:Name="_sbBlacklist"  Orientation="Horizontal" Grid.Row="7" Grid.Column="1" Margin="0,0,0,0">
                        <ComboBox x:Name="_cbFixBlacklist" IsEditable="True" Width="75" Height="Auto" MinHeight="15" Margin="0,2,0,2" KeyDown="FixBlacklistOnKeyDown" ItemsSource="{Binding Settings.FixBlacklist}" ToolTip="Hint: Context menu, right mouse on arrow">
                            <ComboBox.ContextMenu>
                                <ContextMenu>
                                    <MenuItem x:Name="_miFixBlacklistEnabled" IsCheckable="true" IsChecked="{Binding Settings.IsBlacklistEnabled, UpdateSourceTrigger=PropertyChanged}" Header="Enable Blackist"/>
                                    <Separator/>
                                    <MenuItem x:Name="_miFixBlacklistAddFix" Header="Add Fix" Click="FixBlacklistContextMenuClick"/>
                                    <MenuItem x:Name="_miFixBlacklistRemoveSelected" Header="Remove selected" Click="FixBlacklistContextMenuClick"/>
                                    <MenuItem x:Name="_miFixBlacklistSort" Header="Sort" Click="FixBlacklistContextMenuClick"/>
                                    <MenuItem x:Name="_miFixBlacklistClear" Header="Clear" Click="FixBlacklistContextMenuClick"/>
                                </ContextMenu>
                            </ComboBox.ContextMenu>
                        </ComboBox>
                        <ToggleButton x:Name="_tgbBlacklistOn" IsChecked="{Binding Settings.IsBlacklistEnabled, UpdateSourceTrigger=PropertyChanged}" ToolTip="Blacklist on/off" Content="&#x233d;" Margin="5,1,0,0" VerticalAlignment="Center" Width="30"></ToggleButton>
                    </StackPanel>
                    <Label x:Name="_lblDebugInfo" Grid.Row="8" Grid.Column="0" Content="Debug info:" HorizontalAlignment="Left" Grid.ColumnSpan="2"/>
                    <CheckBox x:Name="_cbExtendedComments" IsChecked="{Binding Settings.ExtendedComments, UpdateSourceTrigger=PropertyChanged}" Content="Write extended comments₁₂" Grid.Row="8" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,6,0,0"/>
                    <Label x:Name="_lblAppliesTo" Grid.Row="9" Grid.Column="0" Content="Applies to:" HorizontalAlignment="Left"/>
                    <TextBlock x:Name="_tbAppliesTo"  Grid.Row="9" Grid.Column="1" VerticalAlignment="Center">
                        <Run Text="SCT" />
                        <Run Text="1" BaselineAlignment="Subscript"/>
                        <Run Text=", ESE" />
                        <Run Text="2" BaselineAlignment="Subscript"/>
                        <Run Text=", KML" />
                        <Run Text="3" BaselineAlignment="Subscript"/>
                        <Run Text=", all not annotated"/>
                    </TextBlock>
                </Grid>
            </TabItem>
            <TabItem x:Name="_taiLayoutSettings" Header="Layout settings">
                <Grid x:Name="_grTabLayoutSettings" Background="#FFE5E5E5">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Label x:Name="_lblColours" Grid.Row="0" Grid.Column="0" Content="Colours:" MinWidth="80" HorizontalAlignment="Left"/>
                    <Label x:Name="_lblColourSct" Grid.Column="0" Grid.Row="0" Content="SCT" Margin="20,25,0,0"/>
                    <Label x:Name="_lblColourKml" Grid.Column="0" Grid.Row="0" Content="KML" Margin="20,50,0,0"/>
                    <Grid Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Label x:Name="_lblColourSids" Grid.Column="0" Grid.Row="0" Content="SIDs"  />
                        <Label x:Name="_lblColourStars" Grid.Column="1" Grid.Row="0" Content="STARs" />
                        <Label x:Name="_lblColourTransitions" Grid.Column="2" Grid.Row="0" Content="Transitions" />
                        <Label x:Name="_lblColourApproaches" Grid.Column="3" Grid.Row="0" Content="Approaches" />
                        <TextBox x:Name="_tbColourSctSids" Grid.Row="1" Grid.Column="0" TextWrapping="NoWrap" Text="{Binding Settings.ColourSctSids, UpdateSourceTrigger=PropertyChanged}" Margin="0,0,4,0" />
                        <TextBox x:Name="_tbColourSctStars" Grid.Row="1" Grid.Column="1" TextWrapping="NoWrap" Text="{Binding Settings.ColourSctStars, UpdateSourceTrigger=PropertyChanged}" Margin="0,0,4,0" />
                        <TextBox x:Name="_tbColourSctTransitions" Grid.Row="1" Grid.Column="2" TextWrapping="NoWrap" Text="{Binding Settings.ColourSctTransitions, UpdateSourceTrigger=PropertyChanged}" Margin="0,0,4,0" />
                        <Syncfusion:ColorPickerPalette x:Name="_cpColourKmlSids" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Height="25" VerticalAlignment="Top" MinWidth="90" Margin="0,4,0,0" Color="{Binding Settings.ColourKmlSids, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                        <Syncfusion:ColorPickerPalette x:Name="_cpColourKmlStars" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" Height="25" VerticalAlignment="Top" MinWidth="90" Margin="0,4,0,0" Color="{Binding Settings.ColourKmlStars, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                        <Syncfusion:ColorPickerPalette x:Name="_cpColourKmlTransitions" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Left" Height="25" VerticalAlignment="Top" MinWidth="90" Margin="0,4,0,0" Color="{Binding Settings.ColourKmlTransitions, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                        <Syncfusion:ColorPickerPalette x:Name="_cpColourKmlApproaches" Grid.Column="3" Grid.Row="2" HorizontalAlignment="Left" Height="25" VerticalAlignment="Top" MinWidth="90" Margin="0,4,0,0" Color="{Binding Settings.ColourKmlApproaches, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                        <Slider x:Name="_slOpacityKmlSids" HorizontalAlignment="Stretch" Grid.Column="0" Grid.Row="3" Margin="0,2,0,2" Minimum="0" Maximum="100" TickPlacement="TopLeft" ToolTip="Fill opacity" IsSnapToTickEnabled="True" Value="{Binding Settings.OpacityFillKmlSids, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TickFrequency="10"/>
                        <Slider x:Name="_slOpacityKmlStars" HorizontalAlignment="Stretch" Grid.Column="1" Grid.Row="3" Margin="0,2,0,2" Minimum="0" Maximum="100" TickPlacement="TopLeft" ToolTip="Fill opacity" IsSnapToTickEnabled="True" Value="{Binding Settings.OpacityFillKmlStars, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TickFrequency="10"/>
                        <Slider x:Name="_slOpacityKmlTransitions" HorizontalAlignment="Stretch" Grid.Column="2" Grid.Row="3" Margin="0,2,0,2" Minimum="0" Maximum="100" TickPlacement="TopLeft" ToolTip="Fill opacity" IsSnapToTickEnabled="True" Value="{Binding Settings.OpacityFillKmlTransitions, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TickFrequency="10"/>
                        <Slider x:Name="_slOpacityKmlApproaches" HorizontalAlignment="Stretch" Grid.Column="3" Grid.Row="3" Margin="0,2,0,2" Minimum="0" Maximum="100" TickPlacement="TopLeft" ToolTip="Fill opacity" IsSnapToTickEnabled="True" Value="{Binding Settings.OpacityFillKmlApproaches, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TickFrequency="10"/>
                    </Grid>
                </Grid>
            </TabItem>
        </TabControl>
        <StatusBar x:Name="_stOverallStatus" HorizontalAlignment="Stretch" Grid.Row="2" VerticalAlignment="Bottom" Height="22">
            <StatusBarItem x:Name="_sbiForImage" DockPanel.Dock="Left">
                <Image x:Name="_sbitImage" Source="Resources/Information16x16.png" Width="16" Height="16"/>
            </StatusBarItem>
            <StatusBarItem x:Name="_sbiForText">
                <TextBlock x:Name="_sbitText"><Run Text="Status bar goes here"/></TextBlock>
            </StatusBarItem>
        </StatusBar>
    </Grid>
</Window>
